package com.wh.hotel.dao;

import com.wh.common.annotation.ResultLog;
import com.wh.common.enums.MethodTypeEnum;
import com.wh.hotel.constants.CommonConstant;
import com.wh.hotel.mapper.HotelRoomTypeCalendarMapper;
import com.wh.hotel.po.PriceHitStrategyPo;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author wenhao
 */
@Component
public class HotelRoomTypeCalendarDao {

    @Resource
    private HotelRoomTypeCalendarMapper hotelRoomTypeCalendarMapper;

    @ResultLog(name = "HotelRoomTypeCalendarDao.insertOrUpdate", methodType = MethodTypeEnum.DB)
    public boolean insertOrUpdate(PriceHitStrategyPo hitStrategyPo) {
        return hotelRoomTypeCalendarMapper.insertOrUpdate(hitStrategyPo) >= CommonConstant.SUCCESS_DB;
    }
}
